package com.action.sanction;


import com.db.appline.AppLineManager;
import com.db.appline.VApprovalStateVO;
import com.db.mysandoc.MySandocManager;
import com.db.mysandoc.VExpContentVO;
import com.db.mysandoc.VRepContentVO;
import com.db.sancdoc.VDocManager;
import com.db.sancdoc.VDocVO;
import com.db.sanction.DocumentManager;
import com.db.sanction.ExpenseActListVO;

import java.util.*;

public class ApprovalDocContentAction {
	private String docno;

	ArrayList<VApprovalStateVO> list = new ArrayList<VApprovalStateVO>();
	
	VRepContentVO vo = new VRepContentVO();

	
	VExpContentVO eaVo = new VExpContentVO();
	ArrayList<ExpenseActListVO> eaListVo = new ArrayList<ExpenseActListVO>();

	int doctype;
	
	String rtnValue;
	
	public ArrayList<VApprovalStateVO> getList() {
		return list;
	}

	public void setDocno(String docno) {
		this.docno = docno;
	}
	

	public String getDocno() {
		return docno;
	}

	
	public VRepContentVO getVo() {
		return vo;
	}
	
	

	public VExpContentVO getEaVo() {
		return eaVo;
	}

	public ArrayList<ExpenseActListVO> getEaListVo() {
		return eaListVo;
	}

	public String execute() throws Exception {

		System.out.println("ApprovalDocAction");


		list = (ArrayList<VApprovalStateVO>) AppLineManager.approvalState(docno);
		
		doctype = DocumentManager.getDocTypeNo(docno);

		switch (doctype) {
		case 1:
			
			break;
		case 2:
			System.out.println("case2 : " + doctype);				
			vo = MySandocManager.getMyReport(docno);
			rtnValue = "report";
			break;
		case 3:
			System.out.println("case3 : " + doctype);		
			eaVo = MySandocManager.getMyExpAct(docno);
			eaListVo = MySandocManager.getMyExpActList(docno);
			rtnValue = "expenseAct";
			

			System.out.println("size1 "  + eaVo.getName());
			System.out.println("size2 "  + eaListVo.size());
			break;
		case 4:
			
			break;
		case 5:
			
			break;
		case 6:
			
			break;
		case 7:
			
			break;
		case 8:
			
			break;
		case 9:
			
			break;	
		}
		
		
		
		
		
		
	//	System.out.println(vo);
		return rtnValue;
	}
}
